﻿using DirectService.Server.Com.ROS;
using DirectService.Server.Com.taobao.Models;
using LJLib.Net.SPI.Com;
using System.Collections.Generic;

namespace DirectService.Server.Com.taobao
{
    /// <summary>
    /// TODO: 上传订单(待配对)，应该找个地方保存未配对订单
    /// </summary>
    public sealed class UploadLocalBuyTasksRequest : ITokenRequest<UploadLocalBuyTaskResponse>
    {
        /// <summary>
        /// 门店会话ID
        /// </summary>
        public string token { get; set; }
        /// <summary>
        /// 上传的订单列表
        /// 订单关键信息：
        /// taskcode: 订单号,用于跟踪工厂进度
        /// sptcode: 供应商编码
        /// requiredate
        /// opemp
        /// opdate
        /// relcode
        /// dscrp
        /// skus: 订单明细
        /// 订单明细关键信息:
        /// mtrlcode
        /// status
        /// woodcode
        /// pcode
        /// qty
        /// dscrp
        /// dscrp2
        /// requiredate
        /// price
        /// </summary>
        public List<Task> buytasks { get; set; }

        public string GetApiName()
        {
            return "UploadLocalBuyTasks";
        }
    }

    /// <summary>
    /// 没有异常则上传成功,为了避免重复上传,请区分已上传成功的
    /// </summary>
    public sealed class UploadLocalBuyTaskResponse : LJResponse
    {
        public List<Task> maps { get; set; }
    }
}
